import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

import moduleA from './module/todo'
const store = new Vuex.Store({
    state:{
        count:0
    },
    modules:{
      moduleA
    },
    getters:{
        doubleCount(state){
          return state.count*2
        }
    },
    mutations: {
        increment (state,payload) {
            state.count+=payload.amount;
        }
    }
})
export default store
